use crate::REQWEST_CLIENT;
use anyhow::{ ensure, Result };
use serde::{ Deserialize, Serialize };
use serde_json::Value;
/// 资产负债表 Mapping to [RPT_F10_FINANCE_GBALANCE.json](file:///Users/CC/gitee/conanchen/fuquants-workspace/crates/fudacli/eastmoney/sample/RPT_F10_FINANCE_GBALANCE.json)
#[derive(Debug, Serialize, Deserialize)]
pub struct RptF10FinanceGbalance {
    pub version: Value,
    pub result: RptF10FinanceGbalanceResult,
    pub success: Value,
    pub message: Value,
    pub code: Value,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct RptF10FinanceGbalanceResult {
    pub pages: Value,
    pub data: Vec<RptF10FinanceGbalanceResultData>,
    pub count: Option<Value>,
}

#[derive(Debug, Serialize, Deserialize)]
pub struct RptF10FinanceGbalanceResultData {
    #[serde(rename = "SECUCODE")]
    pub secu_code: Option<Value>, // 证券代码
    #[serde(rename = "SECURITY_CODE")]
    pub security_code: Option<Value>, // 证券代码
    #[serde(rename = "SECURITY_NAME_ABBR")]
    pub security_name_abbr: Option<Value>,
    #[serde(rename = "ORG_CODE")]
    pub org_code: Option<Value>,
    #[serde(rename = "ORG_TYPE")]
    pub org_type: Option<Value>,
    #[serde(rename = "REPORT_DATE")]
    pub report_date: Option<Value>,
    #[serde(rename = "REPORT_TYPE")]
    pub report_type: Option<Value>,
    #[serde(rename = "REPORT_DATE_NAME")]
    pub report_date_name: Option<Value>,
    #[serde(rename = "SECURITY_TYPE_CODE")]
    pub security_type_code: Option<Value>,
    #[serde(rename = "NOTICE_DATE")]
    pub notice_date: Option<Value>,
    #[serde(rename = "UPDATE_DATE")]
    pub update_date: Option<Value>,
    #[serde(rename = "CURRENCY")]
    pub currency: Option<Value>,
    #[serde(rename = "ACCEPT_DEPOSIT_INTERBANK")]
    pub accept_deposit_interbank: Option<Value>,
    #[serde(rename = "ACCOUNTS_PAYABLE")]
    pub accounts_payable: Option<Value>,
    #[serde(rename = "ACCOUNTS_RECE")]
    pub accounts_rece: Option<Value>,
    #[serde(rename = "ACCRUED_EXPENSE")]
    pub accrued_expense: Option<Value>,
    #[serde(rename = "ADVANCE_RECEIVABLES")]
    pub advance_receivables: Option<Value>,
    #[serde(rename = "AGENT_TRADE_SECURITY")]
    pub agent_trade_security: Option<Value>,
    #[serde(rename = "AGENT_UNDERWRITE_SECURITY")]
    pub agent_underwrite_security: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_FINASSET")]
    pub amortize_cost_finasset: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_FINLIAB")]
    pub amortize_cost_finliab: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_NCFINASSET")]
    pub amortize_cost_ncfinasset: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_NCFINLIAB")]
    pub amortize_cost_ncfinliab: Option<Value>,
    #[serde(rename = "APPOINT_FVTPL_FINASSET")]
    pub appoint_fvtpl_finasset: Option<Value>,
    #[serde(rename = "APPOINT_FVTPL_FINLIAB")]
    pub appoint_fvtpl_finliab: Option<Value>,
    #[serde(rename = "ASSET_BALANCE")]
    pub asset_balance: Option<Value>,
    #[serde(rename = "ASSET_OTHER")]
    pub asset_other: Option<Value>,
    #[serde(rename = "ASSIGN_CASH_DIVIDEND")]
    pub assign_cash_dividend: Option<Value>,
    #[serde(rename = "AVAILABLE_SALE_FINASSET")]
    pub available_sale_finasset: Option<Value>,
    #[serde(rename = "BOND_PAYABLE")]
    pub bond_payable: Option<Value>,
    #[serde(rename = "BORROW_FUND")]
    pub borrow_fund: Option<Value>,
    #[serde(rename = "BUY_RESALE_FINASSET")]
    pub buy_resale_finasset: Option<Value>,
    #[serde(rename = "CAPITAL_RESERVE")]
    pub capital_reserve: Option<Value>,
    #[serde(rename = "CIP")]
    pub cip: Option<Value>,
    #[serde(rename = "CONSUMPTIVE_BIOLOGICAL_ASSET")]
    pub consumptive_biological_asset: Option<Value>,
    #[serde(rename = "CONTRACT_ASSET")]
    pub contract_asset: Option<Value>,
    #[serde(rename = "CONTRACT_LIAB")]
    pub contract_liab: Option<Value>,
    #[serde(rename = "CONVERT_DIFF")]
    pub convert_diff: Option<Value>,
    #[serde(rename = "CREDITOR_INVEST")]
    pub creditor_invest: Option<Value>,
    #[serde(rename = "CURRENT_ASSET_BALANCE")]
    pub current_asset_balance: Option<Value>,
    #[serde(rename = "CURRENT_ASSET_OTHER")]
    pub current_asset_other: Option<Value>,
    #[serde(rename = "CURRENT_LIAB_BALANCE")]
    pub current_liab_balance: Option<Value>,
    #[serde(rename = "CURRENT_LIAB_OTHER")]
    pub current_liab_other: Option<Value>,
    #[serde(rename = "DEFER_INCOME")]
    pub defer_income: Option<Value>,
    #[serde(rename = "DEFER_INCOME_1YEAR")]
    pub DEFER_INCOME_1YEAR: Option<Value>,
    #[serde(rename = "DEFER_TAX_ASSET")]
    pub defer_tax_asset: Option<Value>,
    #[serde(rename = "DEFER_TAX_LIAB")]
    pub defer_tax_liab: Option<Value>,
    #[serde(rename = "DERIVE_FINASSET")]
    pub derive_finasset: Option<Value>,
    #[serde(rename = "DERIVE_FINLIAB")]
    pub derive_finliab: Option<Value>,
    #[serde(rename = "DEVELOP_EXPENSE")]
    pub develop_expense: Option<Value>,
    #[serde(rename = "DIV_HOLDSALE_ASSET")]
    pub div_holdsale_asset: Option<Value>,
    #[serde(rename = "DIV_HOLDSALE_LIAB")]
    pub div_holdsale_liab: Option<Value>,
    #[serde(rename = "DIVIDEND_PAYABLE")]
    pub dividend_payable: Option<Value>,
    #[serde(rename = "DIVIDEND_RECE")]
    pub dividend_rece: Option<Value>,
    #[serde(rename = "EQUITY_BALANCE")]
    pub equity_balance: Option<Value>,
    #[serde(rename = "EQUITY_OTHER")]
    pub equity_other: Option<Value>,
    #[serde(rename = "EXPORT_REFUND_RECE")]
    pub export_refund_rece: Option<Value>,
    #[serde(rename = "FEE_COMMISSION_PAYABLE")]
    pub fee_commission_payable: Option<Value>,
    #[serde(rename = "FIN_FUND")]
    pub fin_fund: Option<Value>,
    #[serde(rename = "FINANCE_RECE")]
    pub finance_rece: Option<Value>,
    #[serde(rename = "FIXED_ASSET")]
    pub fixed_asset: Option<Value>,
    #[serde(rename = "FIXED_ASSET_DISPOSAL")]
    pub fixed_asset_disposal: Option<Value>,
    #[serde(rename = "FVTOCI_FINASSET")]
    pub fvtoci_finasset: Option<Value>,
    #[serde(rename = "FVTOCI_NCFINASSET")]
    pub fvtoci_ncfinasset: Option<Value>,
    #[serde(rename = "FVTPL_FINASSET")]
    pub fvtpl_finasset: Option<Value>,
    #[serde(rename = "FVTPL_FINLIAB")]
    pub fvtpl_finliab: Option<Value>,
    #[serde(rename = "GENERAL_RISK_RESERVE")]
    pub general_risk_reserve: Option<Value>,
    #[serde(rename = "GOODWILL")]
    pub goodwill: Option<Value>,
    #[serde(rename = "HOLD_MATURITY_INVEST")]
    pub hold_maturity_invest: Option<Value>,
    #[serde(rename = "HOLDSALE_ASSET")]
    pub holdsale_asset: Option<Value>,
    #[serde(rename = "HOLDSALE_LIAB")]
    pub holdsale_liab: Option<Value>,
    #[serde(rename = "INSURANCE_CONTRACT_RESERVE")]
    pub insurance_contract_reserve: Option<Value>,
    #[serde(rename = "INTANGIBLE_ASSET")]
    pub intangible_asset: Option<Value>,
    #[serde(rename = "INTEREST_PAYABLE")]
    pub interest_payable: Option<Value>,
    #[serde(rename = "INTEREST_RECE")]
    pub interest_rece: Option<Value>,
    #[serde(rename = "INTERNAL_PAYABLE")]
    pub internal_payable: Option<Value>,
    #[serde(rename = "INTERNAL_RECE")]
    pub internal_rece: Option<Value>,
    #[serde(rename = "INVENTORY")]
    pub inventory: Option<Value>,
    #[serde(rename = "INVEST_REALESTATE")]
    pub invest_realestate: Option<Value>,
    #[serde(rename = "LEASE_LIAB")]
    pub lease_liab: Option<Value>,
    #[serde(rename = "LEND_FUND")]
    pub lend_fund: Option<Value>,
    #[serde(rename = "LIAB_BALANCE")]
    pub liab_balance: Option<Value>,
    #[serde(rename = "LIAB_EQUITY_BALANCE")]
    pub liab_equity_balance: Option<Value>,
    #[serde(rename = "LIAB_EQUITY_OTHER")]
    pub liab_equity_other: Option<Value>,
    #[serde(rename = "LIAB_OTHER")]
    pub liab_other: Option<Value>,
    #[serde(rename = "LOAN_ADVANCE")]
    pub loan_advance: Option<Value>,
    #[serde(rename = "LOAN_PBC")]
    pub loan_pbc: Option<Value>,
    #[serde(rename = "LONG_EQUITY_INVEST")]
    pub long_equity_invest: Option<Value>,
    #[serde(rename = "LONG_LOAN")]
    pub long_loan: Option<Value>,
    #[serde(rename = "LONG_PAYABLE")]
    pub long_payable: Option<Value>,
    #[serde(rename = "LONG_PREPAID_EXPENSE")]
    pub long_prepaid_expense: Option<Value>,
    #[serde(rename = "LONG_RECE")]
    pub long_rece: Option<Value>,
    #[serde(rename = "LONG_STAFFSALARY_PAYABLE")]
    pub long_staffsalary_payable: Option<Value>,
    #[serde(rename = "MINORITY_EQUITY")]
    pub minority_equity: Option<Value>,
    #[serde(rename = "MONETARYFUNDS")]
    pub monetaryfunds: Option<Value>,
    #[serde(rename = "NONCURRENT_ASSET_1YEAR")]
    pub NONCURRENT_ASSET_1YEAR: Option<Value>,
    #[serde(rename = "NONCURRENT_ASSET_BALANCE")]
    pub noncurrent_asset_balance: Option<Value>,
    #[serde(rename = "NONCURRENT_ASSET_OTHER")]
    pub noncurrent_asset_other: Option<Value>,
    #[serde(rename = "NONCURRENT_LIAB_1YEAR")]
    pub NONCURRENT_LIAB_1YEAR: Option<Value>,
    #[serde(rename = "NONCURRENT_LIAB_BALANCE")]
    pub noncurrent_liab_balance: Option<Value>,
    #[serde(rename = "NONCURRENT_LIAB_OTHER")]
    pub noncurrent_liab_other: Option<Value>,
    #[serde(rename = "NOTE_ACCOUNTS_PAYABLE")]
    pub note_accounts_payable: Option<Value>,
    #[serde(rename = "NOTE_ACCOUNTS_RECE")]
    pub note_accounts_rece: Option<Value>,
    #[serde(rename = "NOTE_PAYABLE")]
    pub note_payable: Option<Value>,
    #[serde(rename = "NOTE_RECE")]
    pub note_rece: Option<Value>,
    #[serde(rename = "OIL_GAS_ASSET")]
    pub oil_gas_asset: Option<Value>,
    #[serde(rename = "OTHER_COMPRE_INCOME")]
    pub other_compre_income: Option<Value>,
    #[serde(rename = "OTHER_CREDITOR_INVEST")]
    pub other_creditor_invest: Option<Value>,
    #[serde(rename = "OTHER_CURRENT_ASSET")]
    pub other_current_asset: Option<Value>,
    #[serde(rename = "OTHER_CURRENT_LIAB")]
    pub other_current_liab: Option<Value>,
    #[serde(rename = "OTHER_EQUITY_INVEST")]
    pub other_equity_invest: Option<Value>,
    #[serde(rename = "OTHER_EQUITY_OTHER")]
    pub other_equity_other: Option<Value>,
    #[serde(rename = "OTHER_EQUITY_TOOL")]
    pub other_equity_tool: Option<Value>,
    #[serde(rename = "OTHER_NONCURRENT_ASSET")]
    pub other_noncurrent_asset: Option<Value>,
    #[serde(rename = "OTHER_NONCURRENT_FINASSET")]
    pub other_noncurrent_finasset: Option<Value>,
    #[serde(rename = "OTHER_NONCURRENT_LIAB")]
    pub other_noncurrent_liab: Option<Value>,
    #[serde(rename = "OTHER_PAYABLE")]
    pub other_payable: Option<Value>,
    #[serde(rename = "OTHER_RECE")]
    pub other_rece: Option<Value>,
    #[serde(rename = "PARENT_EQUITY_BALANCE")]
    pub parent_equity_balance: Option<Value>,
    #[serde(rename = "PARENT_EQUITY_OTHER")]
    pub parent_equity_other: Option<Value>,
    #[serde(rename = "PERPETUAL_BOND")]
    pub perpetual_bond: Option<Value>,
    #[serde(rename = "PERPETUAL_BOND_PAYBALE")]
    pub perpetual_bond_paybale: Option<Value>,
    #[serde(rename = "PREDICT_CURRENT_LIAB")]
    pub predict_current_liab: Option<Value>,
    #[serde(rename = "PREDICT_LIAB")]
    pub predict_liab: Option<Value>,
    #[serde(rename = "PREFERRED_SHARES")]
    pub preferred_shares: Option<Value>,
    #[serde(rename = "PREFERRED_SHARES_PAYBALE")]
    pub preferred_shares_paybale: Option<Value>,
    #[serde(rename = "PREMIUM_RECE")]
    pub premium_rece: Option<Value>,
    #[serde(rename = "PREPAYMENT")]
    pub prepayment: Option<Value>,
    #[serde(rename = "PRODUCTIVE_BIOLOGY_ASSET")]
    pub productive_biology_asset: Option<Value>,
    #[serde(rename = "PROJECT_MATERIAL")]
    pub project_material: Option<Value>,
    #[serde(rename = "RC_RESERVE_RECE")]
    pub rc_reserve_rece: Option<Value>,
    #[serde(rename = "REINSURE_PAYABLE")]
    pub reinsure_payable: Option<Value>,
    #[serde(rename = "REINSURE_RECE")]
    pub reinsure_rece: Option<Value>,
    #[serde(rename = "SELL_REPO_FINASSET")]
    pub sell_repo_finasset: Option<Value>,
    #[serde(rename = "SETTLE_EXCESS_RESERVE")]
    pub settle_excess_reserve: Option<Value>,
    #[serde(rename = "SHARE_CAPITAL")]
    pub share_capital: Option<Value>,
    #[serde(rename = "SHORT_BOND_PAYABLE")]
    pub short_bond_payable: Option<Value>,
    #[serde(rename = "SHORT_FIN_PAYABLE")]
    pub short_fin_payable: Option<Value>,
    #[serde(rename = "SHORT_LOAN")]
    pub short_loan: Option<Value>,
    #[serde(rename = "SPECIAL_PAYABLE")]
    pub special_payable: Option<Value>,
    #[serde(rename = "SPECIAL_RESERVE")]
    pub special_reserve: Option<Value>,
    #[serde(rename = "STAFF_SALARY_PAYABLE")]
    pub staff_salary_payable: Option<Value>,
    #[serde(rename = "SUBSIDY_RECE")]
    pub subsidy_rece: Option<Value>,
    #[serde(rename = "SURPLUS_RESERVE")]
    pub surplus_reserve: Option<Value>,
    #[serde(rename = "TAX_PAYABLE")]
    pub tax_payable: Option<Value>,
    #[serde(rename = "TOTAL_ASSETS")]
    pub total_assets: Option<Value>,
    #[serde(rename = "TOTAL_CURRENT_ASSETS")]
    pub total_current_assets: Option<Value>,
    #[serde(rename = "TOTAL_CURRENT_LIAB")]
    pub total_current_liab: Option<Value>,
    #[serde(rename = "TOTAL_EQUITY")]
    pub total_equity: Option<Value>,
    #[serde(rename = "TOTAL_LIAB_EQUITY")]
    pub total_liab_equity: Option<Value>,
    #[serde(rename = "TOTAL_LIABILITIES")]
    pub total_liabilities: Option<Value>,
    #[serde(rename = "TOTAL_NONCURRENT_ASSETS")]
    pub total_noncurrent_assets: Option<Value>,
    #[serde(rename = "TOTAL_NONCURRENT_LIAB")]
    pub total_noncurrent_liab: Option<Value>,
    #[serde(rename = "TOTAL_OTHER_PAYABLE")]
    pub total_other_payable: Option<Value>,
    #[serde(rename = "TOTAL_OTHER_RECE")]
    pub total_other_rece: Option<Value>,
    #[serde(rename = "TOTAL_PARENT_EQUITY")]
    pub total_parent_equity: Option<Value>,
    #[serde(rename = "TRADE_FINASSET")]
    pub trade_finasset: Option<Value>,
    #[serde(rename = "TRADE_FINASSET_NOTFVTPL")]
    pub trade_finasset_notfvtpl: Option<Value>,
    #[serde(rename = "TRADE_FINLIAB")]
    pub trade_finliab: Option<Value>,
    #[serde(rename = "TRADE_FINLIAB_NOTFVTPL")]
    pub trade_finliab_notfvtpl: Option<Value>,
    #[serde(rename = "TREASURY_SHARES")]
    pub treasury_shares: Option<Value>,
    #[serde(rename = "UNASSIGN_RPOFIT")]
    pub unassign_rpofit: Option<Value>,
    #[serde(rename = "UNCONFIRM_INVEST_LOSS")]
    pub unconfirm_invest_loss: Option<Value>,
    #[serde(rename = "USERIGHT_ASSET")]
    pub useright_asset: Option<Value>,
    #[serde(rename = "ACCEPT_DEPOSIT_INTERBANK_YOY")]
    pub accept_deposit_interbank_yoy: Option<Value>,
    #[serde(rename = "ACCOUNTS_PAYABLE_YOY")]
    pub accounts_payable_yoy: Option<Value>,
    #[serde(rename = "ACCOUNTS_RECE_YOY")]
    pub accounts_rece_yoy: Option<Value>,
    #[serde(rename = "ACCRUED_EXPENSE_YOY")]
    pub accrued_expense_yoy: Option<Value>,
    #[serde(rename = "ADVANCE_RECEIVABLES_YOY")]
    pub advance_receivables_yoy: Option<Value>,
    #[serde(rename = "AGENT_TRADE_SECURITY_YOY")]
    pub agent_trade_security_yoy: Option<Value>,
    #[serde(rename = "AGENT_UNDERWRITE_SECURITY_YOY")]
    pub agent_underwrite_security_yoy: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_FINASSET_YOY")]
    pub amortize_cost_finasset_yoy: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_FINLIAB_YOY")]
    pub amortize_cost_finliab_yoy: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_NCFINASSET_YOY")]
    pub amortize_cost_ncfinasset_yoy: Option<Value>,
    #[serde(rename = "AMORTIZE_COST_NCFINLIAB_YOY")]
    pub amortize_cost_ncfinliab_yoy: Option<Value>,
    #[serde(rename = "APPOINT_FVTPL_FINASSET_YOY")]
    pub appoint_fvtpl_finasset_yoy: Option<Value>,
    #[serde(rename = "APPOINT_FVTPL_FINLIAB_YOY")]
    pub appoint_fvtpl_finliab_yoy: Option<Value>,
    #[serde(rename = "ASSET_BALANCE_YOY")]
    pub asset_balance_yoy: Option<Value>,
    #[serde(rename = "ASSET_OTHER_YOY")]
    pub asset_other_yoy: Option<Value>,
    #[serde(rename = "ASSIGN_CASH_DIVIDEND_YOY")]
    pub assign_cash_dividend_yoy: Option<Value>,
    #[serde(rename = "AVAILABLE_SALE_FINASSET_YOY")]
    pub available_sale_finasset_yoy: Option<Value>,
    #[serde(rename = "BOND_PAYABLE_YOY")]
    pub bond_payable_yoy: Option<Value>,
    #[serde(rename = "BORROW_FUND_YOY")]
    pub borrow_fund_yoy: Option<Value>,
    #[serde(rename = "BUY_RESALE_FINASSET_YOY")]
    pub buy_resale_finasset_yoy: Option<Value>,
    #[serde(rename = "CAPITAL_RESERVE_YOY")]
    pub capital_reserve_yoy: Option<Value>,
    #[serde(rename = "CIP_YOY")]
    pub cip_yoy: Option<Value>,
    #[serde(rename = "CONSUMPTIVE_BIOLOGICAL_ASSET_YOY")]
    pub consumptive_biological_asset_yoy: Option<Value>,
    #[serde(rename = "CONTRACT_ASSET_YOY")]
    pub contract_asset_yoy: Option<Value>,
    #[serde(rename = "CONTRACT_LIAB_YOY")]
    pub contract_liab_yoy: Option<Value>,
    #[serde(rename = "CONVERT_DIFF_YOY")]
    pub convert_diff_yoy: Option<Value>,
    #[serde(rename = "CREDITOR_INVEST_YOY")]
    pub creditor_invest_yoy: Option<Value>,
    #[serde(rename = "CURRENT_ASSET_BALANCE_YOY")]
    pub current_asset_balance_yoy: Option<Value>,
    #[serde(rename = "CURRENT_ASSET_OTHER_YOY")]
    pub current_asset_other_yoy: Option<Value>,
    #[serde(rename = "CURRENT_LIAB_BALANCE_YOY")]
    pub current_liab_balance_yoy: Option<Value>,
    #[serde(rename = "CURRENT_LIAB_OTHER_YOY")]
    pub current_liab_other_yoy: Option<Value>,
    #[serde(rename = "DEFER_INCOME_1YEAR_YOY")]
    pub DEFER_INCOME_1YEAR_YOY: Option<Value>,
    #[serde(rename = "DEFER_INCOME_YOY")]
    pub defer_income_yoy: Option<Value>,
    #[serde(rename = "DEFER_TAX_ASSET_YOY")]
    pub defer_tax_asset_yoy: Option<Value>,
    #[serde(rename = "DEFER_TAX_LIAB_YOY")]
    pub defer_tax_liab_yoy: Option<Value>,
    #[serde(rename = "DERIVE_FINASSET_YOY")]
    pub derive_finasset_yoy: Option<Value>,
    #[serde(rename = "DERIVE_FINLIAB_YOY")]
    pub derive_finliab_yoy: Option<Value>,
    #[serde(rename = "DEVELOP_EXPENSE_YOY")]
    pub develop_expense_yoy: Option<Value>,
    #[serde(rename = "DIV_HOLDSALE_ASSET_YOY")]
    pub div_holdsale_asset_yoy: Option<Value>,
    #[serde(rename = "DIV_HOLDSALE_LIAB_YOY")]
    pub div_holdsale_liab_yoy: Option<Value>,
    #[serde(rename = "DIVIDEND_PAYABLE_YOY")]
    pub dividend_payable_yoy: Option<Value>,
    #[serde(rename = "DIVIDEND_RECE_YOY")]
    pub dividend_rece_yoy: Option<Value>,
    #[serde(rename = "EQUITY_BALANCE_YOY")]
    pub equity_balance_yoy: Option<Value>,
    #[serde(rename = "EQUITY_OTHER_YOY")]
    pub equity_other_yoy: Option<Value>,
    #[serde(rename = "EXPORT_REFUND_RECE_YOY")]
    pub export_refund_rece_yoy: Option<Value>,
    #[serde(rename = "FEE_COMMISSION_PAYABLE_YOY")]
    pub fee_commission_payable_yoy: Option<Value>,
    #[serde(rename = "FIN_FUND_YOY")]
    pub fin_fund_yoy: Option<Value>,
    #[serde(rename = "FINANCE_RECE_YOY")]
    pub finance_rece_yoy: Option<Value>,
    #[serde(rename = "FIXED_ASSET_DISPOSAL_YOY")]
    pub fixed_asset_disposal_yoy: Option<Value>,
    #[serde(rename = "FIXED_ASSET_YOY")]
    pub fixed_asset_yoy: Option<Value>,
    #[serde(rename = "FVTOCI_FINASSET_YOY")]
    pub fvtoci_finasset_yoy: Option<Value>,
    #[serde(rename = "FVTOCI_NCFINASSET_YOY")]
    pub fvtoci_ncfinasset_yoy: Option<Value>,
    #[serde(rename = "FVTPL_FINASSET_YOY")]
    pub fvtpl_finasset_yoy: Option<Value>,
    #[serde(rename = "FVTPL_FINLIAB_YOY")]
    pub fvtpl_finliab_yoy: Option<Value>,
    #[serde(rename = "GENERAL_RISK_RESERVE_YOY")]
    pub general_risk_reserve_yoy: Option<Value>,
    #[serde(rename = "GOODWILL_YOY")]
    pub goodwill_yoy: Option<Value>,
    #[serde(rename = "HOLD_MATURITY_INVEST_YOY")]
    pub hold_maturity_invest_yoy: Option<Value>,
    #[serde(rename = "HOLDSALE_ASSET_YOY")]
    pub holdsale_asset_yoy: Option<Value>,
    #[serde(rename = "HOLDSALE_LIAB_YOY")]
    pub holdsale_liab_yoy: Option<Value>,
    #[serde(rename = "INSURANCE_CONTRACT_RESERVE_YOY")]
    pub insurance_contract_reserve_yoy: Option<Value>,
    #[serde(rename = "INTANGIBLE_ASSET_YOY")]
    pub intangible_asset_yoy: Option<Value>,
    #[serde(rename = "INTEREST_PAYABLE_YOY")]
    pub interest_payable_yoy: Option<Value>,
    #[serde(rename = "INTEREST_RECE_YOY")]
    pub interest_rece_yoy: Option<Value>,
    #[serde(rename = "INTERNAL_PAYABLE_YOY")]
    pub internal_payable_yoy: Option<Value>,
    #[serde(rename = "INTERNAL_RECE_YOY")]
    pub internal_rece_yoy: Option<Value>,
    #[serde(rename = "INVENTORY_YOY")]
    pub inventory_yoy: Option<Value>,
    #[serde(rename = "INVEST_REALESTATE_YOY")]
    pub invest_realestate_yoy: Option<Value>,
    #[serde(rename = "LEASE_LIAB_YOY")]
    pub lease_liab_yoy: Option<Value>,
    #[serde(rename = "LEND_FUND_YOY")]
    pub lend_fund_yoy: Option<Value>,
    #[serde(rename = "LIAB_BALANCE_YOY")]
    pub liab_balance_yoy: Option<Value>,
    #[serde(rename = "LIAB_EQUITY_BALANCE_YOY")]
    pub liab_equity_balance_yoy: Option<Value>,
    #[serde(rename = "LIAB_EQUITY_OTHER_YOY")]
    pub liab_equity_other_yoy: Option<Value>,
    #[serde(rename = "LIAB_OTHER_YOY")]
    pub liab_other_yoy: Option<Value>,
    #[serde(rename = "LOAN_ADVANCE_YOY")]
    pub loan_advance_yoy: Option<Value>,
    #[serde(rename = "LOAN_PBC_YOY")]
    pub loan_pbc_yoy: Option<Value>,
    #[serde(rename = "LONG_EQUITY_INVEST_YOY")]
    pub long_equity_invest_yoy: Option<Value>,
    #[serde(rename = "LONG_LOAN_YOY")]
    pub long_loan_yoy: Option<Value>,
    #[serde(rename = "LONG_PAYABLE_YOY")]
    pub long_payable_yoy: Option<Value>,
    #[serde(rename = "LONG_PREPAID_EXPENSE_YOY")]
    pub long_prepaid_expense_yoy: Option<Value>,
    #[serde(rename = "LONG_RECE_YOY")]
    pub long_rece_yoy: Option<Value>,
    #[serde(rename = "LONG_STAFFSALARY_PAYABLE_YOY")]
    pub long_staffsalary_payable_yoy: Option<Value>,
    #[serde(rename = "MINORITY_EQUITY_YOY")]
    pub minority_equity_yoy: Option<Value>,
    #[serde(rename = "MONETARYFUNDS_YOY")]
    pub monetaryfunds_yoy: Option<Value>,
    #[serde(rename = "NONCURRENT_ASSET_1YEAR_YOY")]
    pub NONCURRENT_ASSET_1YEAR_YOY: Option<Value>,
    #[serde(rename = "NONCURRENT_ASSET_BALANCE_YOY")]
    pub noncurrent_asset_balance_yoy: Option<Value>,
    #[serde(rename = "NONCURRENT_ASSET_OTHER_YOY")]
    pub noncurrent_asset_other_yoy: Option<Value>,
    #[serde(rename = "NONCURRENT_LIAB_1YEAR_YOY")]
    pub NONCURRENT_LIAB_1YEAR_YOY: Option<Value>,
    #[serde(rename = "NONCURRENT_LIAB_BALANCE_YOY")]
    pub noncurrent_liab_balance_yoy: Option<Value>,
    #[serde(rename = "NONCURRENT_LIAB_OTHER_YOY")]
    pub noncurrent_liab_other_yoy: Option<Value>,
    #[serde(rename = "NOTE_ACCOUNTS_PAYABLE_YOY")]
    pub note_accounts_payable_yoy: Option<Value>,
    #[serde(rename = "NOTE_ACCOUNTS_RECE_YOY")]
    pub note_accounts_rece_yoy: Option<Value>,
    #[serde(rename = "NOTE_PAYABLE_YOY")]
    pub note_payable_yoy: Option<Value>,
    #[serde(rename = "NOTE_RECE_YOY")]
    pub note_rece_yoy: Option<Value>,
    #[serde(rename = "OIL_GAS_ASSET_YOY")]
    pub oil_gas_asset_yoy: Option<Value>,
    #[serde(rename = "OTHER_COMPRE_INCOME_YOY")]
    pub other_compre_income_yoy: Option<Value>,
    #[serde(rename = "OTHER_CREDITOR_INVEST_YOY")]
    pub other_creditor_invest_yoy: Option<Value>,
    #[serde(rename = "OTHER_CURRENT_ASSET_YOY")]
    pub other_current_asset_yoy: Option<Value>,
    #[serde(rename = "OTHER_CURRENT_LIAB_YOY")]
    pub other_current_liab_yoy: Option<Value>,
    #[serde(rename = "OTHER_EQUITY_INVEST_YOY")]
    pub other_equity_invest_yoy: Option<Value>,
    #[serde(rename = "OTHER_EQUITY_OTHER_YOY")]
    pub other_equity_other_yoy: Option<Value>,
    #[serde(rename = "OTHER_EQUITY_TOOL_YOY")]
    pub other_equity_tool_yoy: Option<Value>,
    #[serde(rename = "OTHER_NONCURRENT_ASSET_YOY")]
    pub other_noncurrent_asset_yoy: Option<Value>,
    #[serde(rename = "OTHER_NONCURRENT_FINASSET_YOY")]
    pub other_noncurrent_finasset_yoy: Option<Value>,
    #[serde(rename = "OTHER_NONCURRENT_LIAB_YOY")]
    pub other_noncurrent_liab_yoy: Option<Value>,
    #[serde(rename = "OTHER_PAYABLE_YOY")]
    pub other_payable_yoy: Option<Value>,
    #[serde(rename = "OTHER_RECE_YOY")]
    pub other_rece_yoy: Option<Value>,
    #[serde(rename = "PARENT_EQUITY_BALANCE_YOY")]
    pub parent_equity_balance_yoy: Option<Value>,
    #[serde(rename = "PARENT_EQUITY_OTHER_YOY")]
    pub parent_equity_other_yoy: Option<Value>,
    #[serde(rename = "PERPETUAL_BOND_PAYBALE_YOY")]
    pub perpetual_bond_paybale_yoy: Option<Value>,
    #[serde(rename = "PERPETUAL_BOND_YOY")]
    pub perpetual_bond_yoy: Option<Value>,
    #[serde(rename = "PREDICT_CURRENT_LIAB_YOY")]
    pub predict_current_liab_yoy: Option<Value>,
    #[serde(rename = "PREDICT_LIAB_YOY")]
    pub predict_liab_yoy: Option<Value>,
    #[serde(rename = "PREFERRED_SHARES_PAYBALE_YOY")]
    pub preferred_shares_paybale_yoy: Option<Value>,
    #[serde(rename = "PREFERRED_SHARES_YOY")]
    pub preferred_shares_yoy: Option<Value>,
    #[serde(rename = "PREMIUM_RECE_YOY")]
    pub premium_rece_yoy: Option<Value>,
    #[serde(rename = "PREPAYMENT_YOY")]
    pub prepayment_yoy: Option<Value>,
    #[serde(rename = "PRODUCTIVE_BIOLOGY_ASSET_YOY")]
    pub productive_biology_asset_yoy: Option<Value>,
    #[serde(rename = "PROJECT_MATERIAL_YOY")]
    pub project_material_yoy: Option<Value>,
    #[serde(rename = "RC_RESERVE_RECE_YOY")]
    pub rc_reserve_rece_yoy: Option<Value>,
    #[serde(rename = "REINSURE_PAYABLE_YOY")]
    pub reinsure_payable_yoy: Option<Value>,
    #[serde(rename = "REINSURE_RECE_YOY")]
    pub reinsure_rece_yoy: Option<Value>,
    #[serde(rename = "SELL_REPO_FINASSET_YOY")]
    pub sell_repo_finasset_yoy: Option<Value>,
    #[serde(rename = "SETTLE_EXCESS_RESERVE_YOY")]
    pub settle_excess_reserve_yoy: Option<Value>,
    #[serde(rename = "SHARE_CAPITAL_YOY")]
    pub share_capital_yoy: Option<Value>,
    #[serde(rename = "SHORT_BOND_PAYABLE_YOY")]
    pub short_bond_payable_yoy: Option<Value>,
    #[serde(rename = "SHORT_FIN_PAYABLE_YOY")]
    pub short_fin_payable_yoy: Option<Value>,
    #[serde(rename = "SHORT_LOAN_YOY")]
    pub short_loan_yoy: Option<Value>,
    #[serde(rename = "SPECIAL_PAYABLE_YOY")]
    pub special_payable_yoy: Option<Value>,
    #[serde(rename = "SPECIAL_RESERVE_YOY")]
    pub special_reserve_yoy: Option<Value>,
    #[serde(rename = "STAFF_SALARY_PAYABLE_YOY")]
    pub staff_salary_payable_yoy: Option<Value>,
    #[serde(rename = "SUBSIDY_RECE_YOY")]
    pub subsidy_rece_yoy: Option<Value>,
    #[serde(rename = "SURPLUS_RESERVE_YOY")]
    pub surplus_reserve_yoy: Option<Value>,
    #[serde(rename = "TAX_PAYABLE_YOY")]
    pub tax_payable_yoy: Option<Value>,
    #[serde(rename = "TOTAL_ASSETS_YOY")]
    pub total_assets_yoy: Option<Value>,
    #[serde(rename = "TOTAL_CURRENT_ASSETS_YOY")]
    pub total_current_assets_yoy: Option<Value>,
    #[serde(rename = "TOTAL_CURRENT_LIAB_YOY")]
    pub total_current_liab_yoy: Option<Value>,
    #[serde(rename = "TOTAL_EQUITY_YOY")]
    pub total_equity_yoy: Option<Value>,
    #[serde(rename = "TOTAL_LIAB_EQUITY_YOY")]
    pub total_liab_equity_yoy: Option<Value>,
    #[serde(rename = "TOTAL_LIABILITIES_YOY")]
    pub total_liabilities_yoy: Option<Value>,
    #[serde(rename = "TOTAL_NONCURRENT_ASSETS_YOY")]
    pub total_noncurrent_assets_yoy: Option<Value>,
    #[serde(rename = "TOTAL_NONCURRENT_LIAB_YOY")]
    pub total_noncurrent_liab_yoy: Option<Value>,
    #[serde(rename = "TOTAL_OTHER_PAYABLE_YOY")]
    pub total_other_payable_yoy: Option<Value>,
    #[serde(rename = "TOTAL_OTHER_RECE_YOY")]
    pub total_other_rece_yoy: Option<Value>,
    #[serde(rename = "TOTAL_PARENT_EQUITY_YOY")]
    pub total_parent_equity_yoy: Option<Value>,
    #[serde(rename = "TRADE_FINASSET_NOTFVTPL_YOY")]
    pub trade_finasset_notfvtpl_yoy: Option<Value>,
    #[serde(rename = "TRADE_FINASSET_YOY")]
    pub trade_finasset_yoy: Option<Value>,
    #[serde(rename = "TRADE_FINLIAB_NOTFVTPL_YOY")]
    pub trade_finliab_notfvtpl_yoy: Option<Value>,
    #[serde(rename = "TRADE_FINLIAB_YOY")]
    pub trade_finliab_yoy: Option<Value>,
    #[serde(rename = "TREASURY_SHARES_YOY")]
    pub treasury_shares_yoy: Option<Value>,
    #[serde(rename = "UNASSIGN_RPOFIT_YOY")]
    pub unassign_rpofit_yoy: Option<Value>,
    #[serde(rename = "UNCONFIRM_INVEST_LOSS_YOY")]
    pub unconfirm_invest_loss_yoy: Option<Value>,
    #[serde(rename = "USERIGHT_ASSET_YOY")]
    pub useright_asset_yoy: Option<Value>,
    #[serde(rename = "OPINION_TYPE")]
    pub opinion_type: Option<Value>,
    #[serde(rename = "OSOPINION_TYPE")]
    pub osopinion_type: Option<Value>,
    #[serde(rename = "LISTING_STATE")]
    pub listing_state: Option<Value>,
}

impl RptF10FinanceGbalance {
    /// 资产负债表 列表
    /// Refer: https://emweb.securities.eastmoney.com/pc_hsf10/pages/index.html?type=web&code=SH600519&color=b#/cwfx/zcfzb
    ///
    /// data: https://datacenter.eastmoney.com/securities/api/data/get?type=RPT_F10_FINANCE_GBALANCE&sty=SECURITY_CODE%2CREPORT_DATE%2CREPORT_TYPE%2CREPORT_DATE_NAME&filter=(SECURITY_CODE%3D%22600519%22)&p=1&ps=200&sr=-1&st=REPORT_DATE&source=HSF10&client=PC&v=03653935141666522
    pub async fn rpt_f10_finance_gbalance_list(code: &str) -> Result<RptF10FinanceGbalance> {
        // Query String Parameters:
        //
        // type: RPT_F10_FINANCE_GBALANCE
        // sty: SECURITY_CODE,REPORT_DATE,REPORT_TYPE,REPORT_DATE_NAME
        // filter: (SECURITY_CODE="600519")
        // p: 1
        // ps: 200
        // sr: -1
        // st: REPORT_DATE
        // source: HSF10
        // client: PC
        // v: 03653935141666522

        let request_url = format!(
            "https://datacenter.eastmoney.com/securities/api/data/get?type=RPT_F10_FINANCE_GBALANCE&sty=SECURITY_CODE%2CREPORT_DATE%2CREPORT_TYPE%2CREPORT_DATE_NAME&filter=(SECURITY_CODE%3D%22{code}%22)&p=1&ps=200&sr=-1&st=REPORT_DATE&source=HSF10&client=PC&v=03653935141666522"
        );

        let response = REQWEST_CLIENT.get(request_url)
            .header(reqwest::header::ACCEPT, "*/*")
            .header(reqwest::header::ACCEPT_ENCODING, "gzip, deflate, br")
            .header(reqwest::header::ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9,en;q=0.8")
            .header(reqwest::header::CACHE_CONTROL, "no-cache")
            .header(reqwest::header::CONNECTION, "keep-alive")
            // .header(reqwest::header::COOKIE, "qgqp_b_id=d6299473145338f68687834ba37fa719; st_si=77687174285423; AUTH_FUND.EASTMONEY.COM_GSJZ=AUTH*TTJJ*TOKEN; EMFUND0=01-16%2016%3A57%3A06@%23%24%u4E2D%u822A%u65B0%u8D77%u822A%u7075%u6D3B%u914D%u7F6E%u6DF7%u5408A@%23%24005537; EMFUND1=01-16%2017%3A04%3A53@%23%24%u91D1%u4FE1%u6D88%u8D39%u5347%u7EA7%u80A1%u7968A@%23%24006692; EMFUND2=01-16%2020%3A01%3A56@%23%24%u5357%u65B9%u4E0A%u8BC1380ETF@%23%24510290; EMFUND3=01-29%2015%3A02%3A07@%23%24%u534E%u590F%u4E2D%u8BC1%u5168%u6307%u623F%u5730%u4EA7ETF@%23%24515060; EMFUND4=01-30%2014%3A41%3A22@%23%24%u534E%u6CF0%u67CF%u745E%u6D88%u8D39%u6210%u957F%u6DF7%u5408@%23%24001069; EMFUND5=01-30%2014%3A45%3A59@%23%24%u5E7F%u53D1%u6052%u751F%u6D88%u8D39%28QDII-ETF%29@%23%24159699; EMFUND6=01-30%2014%3A47%3A24@%23%24%u5357%u65B9%u7EA2%u5229%u4F4E%u6CE250ETF@%23%24515450; EMFUND7=01-31%2015%3A21%3A23@%23%24%u56FD%u8054%u4E2D%u8BC1%u7164%u70AD%u6307%u6570%28LOF%29A@%23%24168204; EMFUND8=02-02%2008%3A34%3A56@%23%24%u666F%u987A%u957F%u57CE%u652F%u67F1%u4EA7%u4E1A%u6DF7%u5408@%23%24260117; EMFUND9=02-02 10:30:22@#$%u897F%u90E8%u5229%u5F97%u805A%u79BE%u6DF7%u5408A@%23%24007423; st_asi=delete; HAList=ty-1-513130-%u6052%u751F%u79D1%u6280ETF%2Cty-0-300078-%u601D%u521B%u533B%u60E0%2Cty-0-300486-%u4E1C%u6770%u667A%u80FD%2Cty-1-513360-%u6559%u80B2ETF%2Cty-0-300478-%u676D%u5DDE%u9AD8%u65B0%2Cty-0-301589-N%u8BFA%u74E6%2Cty-1-603135-%u4E2D%u91CD%u79D1%u6280%2Cty-0-600519-%u5E73%u5B89%u94F6%u884C%2Cty-0-002400-%u7701%u5E7F%u96C6%u56E2%2Cty-1-601127-%u8D5B%u529B%u65AF; st_pvi=47260449691882; st_sp=2024-01-12%2017%3A28%3A27; st_inirUrl=https%3A%2F%2Fwww.google.com.hk%2F; st_sn=438; st_psi=20240226102321941-113200301321-9024721593")
            .header(reqwest::header::HOST, "datacenter.eastmoney.com")
            .header(reqwest::header::ORIGIN, "https://emweb.securities.eastmoney.com")
            .header(reqwest::header::PRAGMA, "no-cache")
            .header(reqwest::header::REFERER, "https://emweb.securities.eastmoney.com/")
            .header(
                reqwest::header::USER_AGENT,
                "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
            )
            .header(
                "Sec-Ch-Ua",
                "\"Not A(Brand\";v=\"99\", \"Google Chrome\";v=\"121\", \"Chromium\";v=\"121\""
            )
            .header("Sec-Ch-Ua-Mobile", "?0")
            .header("Sec-Ch-Ua-Platform", "\"macOS\"")
            .header("Sec-Fetch-Dest", "empty")
            .header("Sec-Fetch-Mode", "cors")
            .header("Sec-Fetch-Site", "same-origin")
            .send().await?;

        let body = response.text().await?;

        // println!("*** body={}\n\nhangqin\n\n", body);

        let fund: RptF10FinanceGbalance = serde_json::from_str(&body)?;

        // println!("{:?}", fund);

        Ok(fund)
    }

    /// 资产负债表 详细 按报告期 == 报告期同比 使用相同API获取
    /// Referer: https://emweb.securities.eastmoney.com/pc_hsf10/pages/index.html?type=web&code=SH600519&color=b#/cwfx/zcfzb
    ///
    /// data: https://datacenter.eastmoney.com/securities/api/data/get?type=RPT_F10_FINANCE_GBALANCE&sty=F10_FINANCE_GBALANCE&filter=(SECUCODE%3D%22600519.SH%22)&p=1&ps=5&sr=-1&st=REPORT_DATE&source=HSF10&client=PC&v=006892387049920456
    pub async fn rpt_f10_finance_gbalance(code: &str) -> Result<RptF10FinanceGbalance> {
        // Query String Parameters:
        //
        let type_ = "RPT_F10_FINANCE_GBALANCE";
        let sty = "F10_FINANCE_GBALANCE";
        let filter = "(SECUCODE=\"600519.SH\")";
        let p = 1;
        let ps = 5;
        let sr = -1;
        let st = "REPORT_DATE";
        let source = "HSF10";
        let client = "PC";
        let v = utils::duration_ms_since_epoch(); //020216337616839342;

        let request_url = format!(
            "https://datacenter.eastmoney.com/securities/api/data/get?type={type_}&sty={sty}&filter={filter}&p={p}&ps={ps}&sr={sr}&st={st}&source={source}&client={client}&v=006892387049920456"
        );

        let response = REQWEST_CLIENT.get(request_url)
            .header(reqwest::header::ACCEPT, "*/*")
            .header(reqwest::header::ACCEPT_ENCODING, "gzip, deflate, br")
            .header(reqwest::header::ACCEPT_LANGUAGE, "zh-CN,zh;q=0.9,en;q=0.8")
            .header(reqwest::header::CACHE_CONTROL, "no-cache")
            .header(reqwest::header::CONNECTION, "keep-alive")
            // .header(reqwest::header::COOKIE, "qgqp_b_id=d6299473145338f68687834ba37fa719; st_si=77687174285423; AUTH_FUND.EASTMONEY.COM_GSJZ=AUTH*TTJJ*TOKEN; EMFUND0=01-16%2016%3A57%3A06@%23%24%u4E2D%u822A%u65B0%u8D77%u822A%u7075%u6D3B%u914D%u7F6E%u6DF7%u5408A@%23%24005537; EMFUND1=01-16%2017%3A04%3A53@%23%24%u91D1%u4FE1%u6D88%u8D39%u5347%u7EA7%u80A1%u7968A@%23%24006692; EMFUND2=01-16%2020%3A01%3A56@%23%24%u5357%u65B9%u4E0A%u8BC1380ETF@%23%24510290; EMFUND3=01-29%2015%3A02%3A07@%23%24%u534E%u590F%u4E2D%u8BC1%u5168%u6307%u623F%u5730%u4EA7ETF@%23%24515060; EMFUND4=01-30%2014%3A41%3A22@%23%24%u534E%u6CF0%u67CF%u745E%u6D88%u8D39%u6210%u957F%u6DF7%u5408@%23%24001069; EMFUND5=01-30%2014%3A45%3A59@%23%24%u5E7F%u53D1%u6052%u751F%u6D88%u8D39%28QDII-ETF%29@%23%24159699; EMFUND6=01-30%2014%3A47%3A24@%23%24%u5357%u65B9%u7EA2%u5229%u4F4E%u6CE250ETF@%23%24515450; EMFUND7=01-31%2015%3A21%3A23@%23%24%u56FD%u8054%u4E2D%u8BC1%u7164%u70AD%u6307%u6570%28LOF%29A@%23%24168204; EMFUND8=02-02%2008%3A34%3A56@%23%24%u666F%u987A%u957F%u57CE%u652F%u67F1%u4EA7%u4E1A%u6DF7%u5408@%23%24260117; EMFUND9=02-02 10:30:22@#$%u897F%u90E8%u5229%u5F97%u805A%u79BE%u6DF7%u5408A@%23%24007423; st_asi=delete; HAList=ty-1-513130-%u6052%u751F%u79D1%u6280ETF%2Cty-0-300078-%u601D%u521B%u533B%u60E0%2Cty-0-300486-%u4E1C%u6770%u667A%u80FD%2Cty-1-513360-%u6559%u80B2ETF%2Cty-0-300478-%u676D%u5DDE%u9AD8%u65B0%2Cty-0-301589-N%u8BFA%u74E6%2Cty-1-603135-%u4E2D%u91CD%u79D1%u6280%2Cty-0-600519-%u5E73%u5B89%u94F6%u884C%2Cty-0-002400-%u7701%u5E7F%u96C6%u56E2%2Cty-1-601127-%u8D5B%u529B%u65AF; st_pvi=47260449691882; st_sp=2024-01-12%2017%3A28%3A27; st_inirUrl=https%3A%2F%2Fwww.google.com.hk%2F; st_sn=438; st_psi=20240226102321941-113200301321-9024721593")
            .header(reqwest::header::HOST, "datacenter.eastmoney.com")
            .header(reqwest::header::ORIGIN, "https://emweb.securities.eastmoney.com")
            .header(reqwest::header::PRAGMA, "no-cache")
            .header(reqwest::header::REFERER, "https://emweb.securities.eastmoney.com/")
            .header(
                reqwest::header::USER_AGENT,
                "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36"
            )
            .header(
                "Sec-Ch-Ua",
                "\"Not A(Brand\";v=\"99\", \"Google Chrome\";v=\"121\", \"Chromium\";v=\"121\""
            )
            .header("Sec-Ch-Ua-Mobile", "?0")
            .header("Sec-Ch-Ua-Platform", "\"macOS\"")
            .header("Sec-Fetch-Dest", "empty")
            .header("Sec-Fetch-Mode", "cors")
            .header("Sec-Fetch-Site", "same-origin")
            .send().await?;

        let body = response.text().await?;

        // println!("*** body={}\n\nhangqin\n\n", body);

        let fund: RptF10FinanceGbalance = serde_json::from_str(&body)?;

        // println!("{:?}", fund);

        Ok(fund)
    }
}

#[cfg(test)]
mod test {
    use super::*;

    #[tokio::test]
    async fn test_stock_rpt_f10_finance_gbalance_list() {
        let result = RptF10FinanceGbalance::rpt_f10_finance_gbalance_list("600519").await;

        // println!("result={:?}",result);

        assert_eq!(result.is_ok(), true);
        if let Ok(finance_gbalance) = result {
            assert_eq!(finance_gbalance.message.as_str(), Some("ok"));
            println!(
                "finance_gbalance.result.data.first()= {:?}\n",
                finance_gbalance.result.data.first()
            );
        }
    }

    #[tokio::test]
    async fn test_stock_rpt_f10_finance_gbalance() {
        let result = RptF10FinanceGbalance::rpt_f10_finance_gbalance("600519.SH").await;

        assert_eq!(result.is_ok(), true);
        if let Ok(finance_gbalance) = result {
            assert_eq!(finance_gbalance.message.as_str(), Some("ok"));
            println!("{:?}\n", finance_gbalance);
        }
    }
}
